const mysql=require('mysql');

var connection=mysql.createConnection({
    host:'localhost',
    user:'root',
    password:'root',
    database:'1803',
    port:3306
});
connection.connect(err=>{
    if(err){
        console.log('connect fail');
    }
    console.log('connect success');
});
//var userSelectSql='select * from user';
var userInsertSql='insert into user (email,password) values (?,?)';
var parmas=['b222','b222'];

connection.query(userSelectSql,parmas,(err,results)=>{
    if(err){
        console.log('query fail');
        return;
    }
   // var resultLength=results.length;
   // for(let i=0;i<resultLength;i++){
       // console.log(result[i].email);
   // }
   console.log('insert success',results)
});
connection.end(err=>{
    console.log('end');
});

//console.log(Connection)